package com.zf.yichat.api.dto.request;

import com.zf.yichat.utils.YiChatMsgCode;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.internal.util.Contracts;

/**
 * 一句话描述功能
 *
 * @author fengsong
 * @date create in 11:10 2020/3/17 2020
 */
public class MissionSubmitRequest extends FsRequest {

    private Long missionId;
    private String imgs;
    private String memo;

    public String getImgs() {
        return imgs;
    }

    public void setImgs(String imgs) {
        this.imgs = imgs;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public Long getMissionId() {
        return missionId;
    }

    public void setMissionId(Long missionId) {
        this.missionId = missionId;
    }

    @Override
    public void valid() {
        Contracts.assertTrue(StringUtils.isNotBlank(imgs) || StringUtils.isNotBlank(memo), YiChatMsgCode.SYSTEM_PARAM_ERROR.msg());
        Contracts.assertNotNull(missionId, YiChatMsgCode.SYSTEM_PARAM_ERROR.msg());
    }
}
